package com.zzc.mapper;

import com.zzc.pojo.Role;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface RoleMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Role record);

    int insertSelective(Role record);

    Role selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Role record);

    int updateByPrimaryKey(Role record);

    /**
     * 动态查询角色信息
     * @param name
     * @return
     */
    List<Role> getRoleList(@Param("name") String name);

    /**
     * 根据权限获取菜单id集合
     * @param roleId
     * @return
     */
    List<Integer> getRoleMenuId(Integer roleId);
}